package com.autumn.config.cfg;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cloud.config.server.environment.EnvironmentRepository;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.autumn.config.environment.DatabaseEnvironmentRepository;

/**
 * 
 * @author 老码农
 *         <p>
 *         Description
 *         </p>
 * @date 2018-01-21 22:31:52
 */
@Configuration
@ConditionalOnMissingBean({ EnvironmentRepository.class })
public class AutunmConfigConfiguration {

	/**
	 * 注入 NativeEnvironmentRepository
	 * 
	 * @return
	 */
	@Bean
	public EnvironmentRepository databaseEnvironmentRepository() {
		return new DatabaseEnvironmentRepository();
	}
}
